package com.sudo.dao.admin.model.vo;

import com.sudo.dao.admin.entity.SysMenu;
import lombok.Data;

import java.util.List;

/**
 * @author 为道日损 2020-04-27 20:56
 */
@Data
public class SysMenuPearVO {

    /**
     * menuCode
      */
    private String id;
    /**
     * menuName
      */
    private String title;

    /**
     * menuIcon
     */
    private String icon;

    /**
     *  0.目录，1.页面
     */
    private Integer type;

    /**
     * menuUrl
     */
    private String href;

    private String openType;

    private List<SysMenuPearVO> children;

    public SysMenuPearVO() {
    }

    public SysMenuPearVO(SysMenu sysMenu) {
        this.id = sysMenu.getMenuCode();
        this.title = sysMenu.getMenuName();
        this.icon = sysMenu.getMenuIcon();
        this.type = 1;
        this.openType = "_iframe";
        this.href = sysMenu.getMenuUrl();
    }

}
